package com.gouqi.mall.service.impl;

import com.gouqi.mall.domain.Message;
import com.gouqi.mall.domain.dto.MessageResult;
import com.gouqi.mall.mapper.MessageMapper;
import com.gouqi.mall.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MessageServiceImpl implements MessageService {

    @Autowired
    private MessageMapper mapper;
    @Override
    public Integer addMessage(Message message) {
        return mapper.addMessage(message);
    }

    @Override
    public Integer updateMessage(Message message) {
        return mapper.updateMessage(message);
    }

    @Override
    public List<MessageResult> getAllMessages() {
        return mapper.getAllMessages();
    }

    @Override
    public MessageResult getDescMessage(Integer id) {
        return mapper.getDescMessage(id);
    }

    @Override
    public Integer deleteMessage(Integer id) {
        return mapper.deleteMessage(id);
    }
}
